extends Area2D

# 用于控制是否显示攻击范围
var show_attack_range = false

func _ready():
	pass

func _process(delta):
	pass

func _draw():
	if show_attack_range:
		var polygon = $CollisionPolygon2D.polygon
		draw_colored_polygon(polygon, Color(1, 0, 0, 0.5))  # 绘制红色半透明的攻击范围

func show_attack_area(show):
	show_attack_range = show
	queue_redraw();
